import { defineStore } from "pinia"

export const useRouteInfoStore = defineStore({
    id: 'routeInfo',
    state: () => ({
        showDialog: false,
        info: [],
        path: '',
        title: ''
    }),
    actions: {
        async SetShowDialog(show: any) {

            this.$patch({
                showDialog: show,
            });
        },
        async Setinfo(data: any) {
            this.$patch({
                info: data,
            });
        },
        async Setpath(path: any) {
            this.$patch({
                path: path,
            });
        },
        async setTitle(title: any) {
            this.$patch({
                title: title
            })
        }
    },
})